<?php

namespace app\common\validate;
use think\Validate;

class Cate extends Validate{
	
	protected $rule=[
		'catename|栏目名称'=>'require|unique:cate',
		'sort|排序'=>'require|number'
		
	];
	//栏目添加场景
	public function sceneAdd(){

		return $this->only(['catename','sort']);

	}
	//排序
	public function sceneSort(){
		return $this->only(['sotr']);
	}
	//编辑
	public function sceneEdit(){
		return $this->only(['catename']);
	}

}